int a=3,b=4,max,min;
max=a>b?a:b;
min=a>b?b:a;
System.out.println("max="+max+"\nmin="+min);
